Virtual machines, which are an abstraction of physical computing resources, may communicate with other virtual machines using a network. The network may be a virtual network, which is an abstraction, or virtualization, of a physical network. Virtual networks may operate as layer two in the OSI model between and among virtual machines. Unlike physical networks, virtual networks are not constrained by physical links and topology. Thus, virtual machines within a virtual network may move from one physical computer to another without affecting communication within the virtual network. One such virtual network is a Virtual Extensible LAN (VXLAN), as described in the white paper titled “Scalable Cloud Networking with Cisco Nexus 1000V Series Switches and VXLAN”, which is filed herewith and is incorporated by reference in its entirety. As described therein: VXLAN provides a MAC in User Datagram Protocol (MAC-in-UDP) encapsulation technique and a 24-bit segment identifier in the form of a VXLAN ID. The UDP encapsulation allows each LAN segment to be extended across Layer 3. Therefore, virtual networks can be extended among machines placed in different Layer 2 domains. For VXLAN traffic to use network services on physical devices, such as a physical firewall, the traffic needs to go through a VXLAN gateway.
Many networking and security services are offered for physical networks, such as load balancers, firewalls, virus scanners, etc. Some services operate within a network, while others operate as a gateway or outside of a network. Such services may be unable to communicate with virtual networks, and virtual networks may be unaware that such services exist on a network. Some services are able to communicate with virtual networks, however, there is currently no method for uniformly introducing and consuming such services within virtual networks. Accordingly, there is a need for a uniform method of introducing and consuming network services for use with virtual networks.